<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
// hack. Nunca debiera programarse así
if (!isset($host)) {
    $host = 'localhost';
}
if (!isset($user)) {
    $user = 'fichas';
}
if (!isset($pass)) {
    $pass = 'fichas';
}
$cstr = "
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST =" . strtoupper($host) . ")(PORT = 1521))
 (CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = xe)
 )
 )";


if (isset($encod)) {
    $conn = oci_connect($user, $pass, $cstr, $encod);
} else {
    $conn = oci_connect($user, $pass, $cstr);
}
$e = oci_error();
?>


